package com.abc.qq.view.tcp2;

import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.net.Socket;

public class MyClient2 {
    public static void main(String[] args) {
        try {//10.7.81.124
            Socket socket = new Socket("10.7.81.124",8888);
            InputStream is = socket.getInputStream();
            OutputStream os =  socket.getOutputStream();

            os.write("2023015684".getBytes());
            os.flush();

            byte[] cache = new byte[10];
            is.read(cache);
            System.out.println(new String(cache).trim());
            os.close();

        } catch (IOException e) {
            throw new RuntimeException(e);
        }
    }
}
